<!DOCTYPE html>
<html lang="zh-Hans">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>VIP视频解析</title>
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>

<style>
    .header {
        margin-top: 5%;
    }

    .main {
        padding: 10px 15%;
    }

    .footer {
        padding: 10px 15%;
    }
</style>

<body>
    <div class="container">
        <div class="header h1 text-center">
            <h1>VIP视频解析</h1>
        </div>
        <br />
        <div class="main">
            <form class="form-horizontal" method="post">
                <div class="form-group">
                    <label for="api" class="col-sm-2 control-label">API地址</label>
                    <div class="col-sm-10">
                        <select id="api" name="api" class="form-control"></select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="url" class="col-sm-2 control-label">视频地址</label>
                    <div class="col-sm-10">
                        <input type="url" class="form-control" id="url" name="url" placeholder="视频地址">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="button" id="play" class="btn btn-primary">解 析</button>
                    </div>
                </div>
            </form>
        </div>
        <hr />

        <div class="main">
            <div class="h4 text-center">
                <a href="javascript:setDefault();">恢复默认</a>
            </div>
            <div class="form-horizontal">
                <div class="form-group">
                    <label for="url" class="col-sm-2 control-label">API列表，可编辑</label>
                    <div class="col-sm-10">
                        <textarea rows="10" id="apiList" class="form-control">
https://jx.jsonplayer.com/player/?url=
https://www.yemu.xyz/?url=
https://www.8090g.cn/?url=
https://jx.xyflv.com/?url=
https://jx.qqqjx.com/?url=
https://jx.ppflv.com/?url=
https://jx.nnxv.cn/tv.php?url=
https://ddjx.cc/?url=
https://www.ckplayer.vip/jiexi/?url=
https://yparse.ik9.cc/index.php?url=
https://vip.bljiex.com/?v=
https://jx.iztyy.cc/svip/?url=
https://jx.m3u8.tv/jiexi/?url=
https://bd.jx.cn/?url=
https://www.playm3u8.cn/jiexi.php?url=
https://www.h8jx.com/jiexi.php?url=</textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="footer text-center">
            <p>
                <a href="https://www.bahuangshanren.tech/" target="_blank">Blog on Vercel</a>&emsp;
                <a href="https://zhyoch.netlify.app/" target="_blank">Blog on Netlify</a>&emsp;
                <a href="https://nav.bahuangshanren.tech/" target="_blank">Navigation on Vercel</a>&emsp;
                <a href="https://zhyoch-nav.netlify.app/" target="_blank">Navigation on Netlify</a>
            </p>
        </div>
    </div>

    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
    <script>
        function setApi() {
            $("#api").children().remove();
            var apilist = $("#apiList").val().split(/\r?\n/);
            for (var i = 0; i < apilist.length; i++) {
                $("#api").append("<option>" + apilist[i] + "</option>");
            }
        }
        $("#apiList").blur(function () {
            setApi();
            $.cookie("apiList", $("#apiList").val());
        });
        $("#play").click(function () {
            $api = $("#api").val();
            $url = $("#url").val();
            if ($url == "" || $url == null || !/^http.*$/.test($url)) {
                alert('视频地址不正确！');
                return;
            }
            if ($url == "" || $url == null || !/^http.*=$/.test($api)) {
                alert('无效API！');
                return;
            }
            window.open($api + $url);
        });
        function init() {
            var ckapi = $.cookie("apiList");
            if (ckapi && ckapi != "") {
                $("#apiList").val(ckapi);
            }
            setApi();
        }
        init();
        function setDefault() {
            $.cookie("apiList", "");
            window.location.reload();
        }
    </script>
</body>

</html>